<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "d_try.order_express".
 *
 * @property integer $order_express_id
 * @property integer $order_info_id
 * @property string  $consignee
 * @property string  $province
 * @property string  $city
 * @property string  $county
 * @property string  $telephone
 * @property string  $mobile_phone
 * @property string  $address
 * @property string  $zip
 * @property integer $delivery_id
 * @property integer $delivery_time
 * @property string  $create_time
 * @property string  $delivery_code
 */
class OrderExpressHistory extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'd_order_history.order_express';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['order_info_id', 'delivery_id', 'delivery_time'], 'integer'],
            [['create_time'], 'safe'],
            [['consignee'], 'string', 'max' => 20],
            [['delivery_code'], 'string', 'max' => 40],
            [['province'], 'string', 'max' => 10],
            [['city', 'county'], 'string', 'max' => 30],
            [['telephone'], 'string', 'max' => 50],
            [['mobile_phone'], 'string', 'max' => 11],
            [['address'], 'string', 'max' => 80],
            [['zip'], 'string', 'max' => 6],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'order_express_id' => 'ID',
            'order_info_id'    => '订单id',
            'consignee'        => '收货人',
            'province'         => '省',
            'city'             => '市 ',
            'county'           => '区（县）',
            'telephone'        => '电话',
            'mobile_phone'     => '手机',
            'address'          => '地址',
            'zip'              => '邮编',
            'delivery_id'      => '送货方式 0 韵达快递',
            'delivery_time'    => '送货时间 取值1 2 3',
            'create_time'      => 'Create Time',
            'delivery_code'    => '快递单号',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\OrderExpressQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\OrderExpressQuery(get_called_class());
    }
}
